package com.hu.zhcc.shiro.controller;

import com.hu.zhcc.common.entity.Page;
import com.hu.zhcc.shiro.entity.bo.HMemberofthefile;
import com.hu.zhcc.shiro.entity.bo.OrderSetting;
import com.hu.zhcc.shiro.entity.bo.RReporttoupload;
import com.hu.zhcc.shiro.entity.bo.TOrder;
import com.hu.zhcc.shiro.service.HMemberofthefileService;
import com.hu.zhcc.shiro.service.OrderSettingService;
import com.hu.zhcc.shiro.service.RReporttouploadService;
import com.hu.zhcc.shiro.service.TOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;


/**
 * 体验上传
 *
 */
@RestController
@RequestMapping("/report")
public class RReporttouploadController {
    
    @Autowired
    private RReporttouploadService rReporttouploadService;

    @GetMapping("/reportAll")
    private Page<RReporttoupload> findAll(int offset, int limit) {
        return rReporttouploadService.findRrList(offset,limit);
    }

    @GetMapping("/reportKey/{id}")
    private RReporttoupload getMemberById(@PathVariable("id") int id) {
        return rReporttouploadService.selectByPrimaryKey(id);
    }

    @PostMapping("/addReport")
    private int addfind(@RequestBody RReporttoupload rReporttoupload){
        return rReporttouploadService.insertSelective(rReporttoupload);
    }

    @DeleteMapping("/removeReport/{id}")
    private int removeMember(@PathVariable("id") int id) {
        return rReporttouploadService.deleteByPrimaryKey(id);
    }

    /**
     * 修改未用
     * @param rReporttoupload
     * @return
     */
    @PutMapping("/updateReport")
    private int updateMember(@RequestBody RReporttoupload rReporttoupload) {
        return rReporttouploadService.updateByPrimaryKeySelective(rReporttoupload);
    }
}
